Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update recomp.cpp for msys2mingw64 capstone #15

Open
wants to merge 1 commit into
base: per-function
Choose a base branch
from

Conversation

MegaMech
Copy link

@MegaMech MegaMech commented Dec 28, 2021

For some reason, capstone is installed weird. and has an extra capstone folder.

@Emill
Copy link
Owner

Emill commented Dec 28, 2021

So this patch seem to affect when _WIN32/_WIN64 are not defined, i.e. Linux for example?

@MegaMech
Copy link
Author

MegaMech commented Dec 28, 2021

Yes Linux works fine with the default <capstone.h>
windows appears to need capstone/capstone.h

@Emill
Copy link
Owner

Emill commented Dec 29, 2021

Can pkg-config to add the correct include path maybe, then we can only use <capstone.h>?

@MegaMech
Copy link
Author

No idea how that works. But if it works then sure.

@tehzz
Copy link

tehzz commented Dec 29, 2021

I'm actually working on build recomp for ARM macs, so this will be interesting the merge

But for pkg-config, here's what sm64 uses in their makfile:

`pkg-config --cflags --libs capstone`

So, you'd have something like

$(RECOMP): recomp.cpp elf.h
	$(CXX) $< -o $@ -std=c++11 -O2 -Wno-switch `pkg-config --cflags --libs capstone`

if you're still using the python build script, i'd guess you shell out to call pkg-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants